import Vue from 'vue'
import Vuex from 'vuex'

import user from './module/user'
import file from './module/file'
import createPersistedState from 'vuex-persistedstate'

Vue.use(Vuex)

const store = new Vuex.Store({
  plugins: [createPersistedState({
    storage: window.sessionStorage
  })],

  modules: {
    file,
    user
  }
})

export default store
